package com.yuyou.tas.feedback.service.impl;

import com.yuyou.tas.feedback.mapper.FeedbackTeacherPraiseMapper;
import com.yuyou.tas.feedback.service.IFeedbackTeacherPraiseService;
import com.yuyou.tas.service.api.feedback.entity.FeedbackTeacherPraise;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FeedbackTeacherPraiseServiceImpl implements IFeedbackTeacherPraiseService {


    @Autowired
    private FeedbackTeacherPraiseMapper mapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(FeedbackTeacherPraise record) {
        return mapper.insert(record);
    }

    @Override
    public FeedbackTeacherPraise selectByPrimaryKey(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(FeedbackTeacherPraise record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<FeedbackTeacherPraise> findByFeedbackClassId(Long feedbackClassId) {
        return mapper.findByFeedbackClassId(feedbackClassId);
    }

    @Override
    public Long countPraiseByFeedbackClassId(Long feedbackClassId) {
        return mapper.countPraiseByFeedbackClassId(feedbackClassId);
    }

    @Override
    public Long countPraiseByFeedbackClassIdUserId(Long feedbackClassId, Long userId) {
        return mapper.countPraiseByFeedbackClassIdUserId(feedbackClassId, userId);
    }
}